//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension EMRContainers {
    // MARK: Enums

    public enum AllowAWSToRetainLogs: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum CertificateProviderType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case pem = "PEM"
        public var description: String { return self.rawValue }
    }

    public enum ContainerProviderType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case eks = "EKS"
        public var description: String { return self.rawValue }
    }

    public enum EndpointState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case terminated = "TERMINATED"
        case terminatedWithErrors = "TERMINATED_WITH_ERRORS"
        case terminating = "TERMINATING"
        public var description: String { return self.rawValue }
    }

    public enum FailureReason: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case clusterUnavailable = "CLUSTER_UNAVAILABLE"
        case internalError = "INTERNAL_ERROR"
        case userError = "USER_ERROR"
        case validationError = "VALIDATION_ERROR"
        public var description: String { return self.rawValue }
    }

    public enum JobRunState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cancelPending = "CANCEL_PENDING"
        case cancelled = "CANCELLED"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case pending = "PENDING"
        case running = "RUNNING"
        case submitted = "SUBMITTED"
        public var description: String { return self.rawValue }
    }

    public enum PersistentAppUI: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum TemplateParameterDataType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case number = "NUMBER"
        case string = "STRING"
        public var description: String { return self.rawValue }
    }

    public enum VirtualClusterState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case arrested = "ARRESTED"
        case running = "RUNNING"
        case terminated = "TERMINATED"
        case terminating = "TERMINATING"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AuthorizationConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Encryption-related configuration input for the security configuration.
        public let encryptionConfiguration: EncryptionConfiguration?
        /// Lake Formation related configuration inputs for the security configuration.
        public let lakeFormationConfiguration: LakeFormationConfiguration?

        @inlinable
        public init(encryptionConfiguration: EncryptionConfiguration? = nil, lakeFormationConfiguration: LakeFormationConfiguration? = nil) {
            self.encryptionConfiguration = encryptionConfiguration
            self.lakeFormationConfiguration = lakeFormationConfiguration
        }

        public func validate(name: String) throws {
            try self.encryptionConfiguration?.validate(name: "\(name).encryptionConfiguration")
            try self.lakeFormationConfiguration?.validate(name: "\(name).lakeFormationConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case encryptionConfiguration = "encryptionConfiguration"
            case lakeFormationConfiguration = "lakeFormationConfiguration"
        }
    }

    public struct CancelJobRunRequest: AWSEncodableShape {
        /// The ID of the job run to cancel.
        public let id: String
        /// The ID of the virtual cluster for which the job run will be canceled.
        public let virtualClusterId: String

        @inlinable
        public init(id: String, virtualClusterId: String) {
            self.id = id
            self.virtualClusterId = virtualClusterId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
            request.encodePath(self.virtualClusterId, key: "virtualClusterId")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 64)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-z]+$")
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, max: 64)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, min: 1)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, pattern: "^[0-9a-z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CancelJobRunResponse: AWSDecodableShape {
        /// The output contains the ID of the cancelled job run.
        public let id: String?
        /// The output contains the virtual cluster ID for which the job run is cancelled.
        public let virtualClusterId: String?

        @inlinable
        public init(id: String? = nil, virtualClusterId: String? = nil) {
            self.id = id
            self.virtualClusterId = virtualClusterId
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
            case virtualClusterId = "virtualClusterId"
        }
    }

    public struct Certificate: AWSDecodableShape {
        /// The ARN of the certificate generated for managed endpoint.
        public let certificateArn: String?
        /// The base64 encoded PEM certificate data generated for managed endpoint.
        public let certificateData: String?

        @inlinable
        public init(certificateArn: String? = nil, certificateData: String? = nil) {
            self.certificateArn = certificateArn
            self.certificateData = certificateData
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn = "certificateArn"
            case certificateData = "certificateData"
        }
    }

    public struct CloudWatchMonitoringConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The name of the log group for log publishing.
        public let logGroupName: String
        /// The specified name prefix for log streams.
        public let logStreamNamePrefix: String?

        @inlinable
        public init(logGroupName: String, logStreamNamePrefix: String? = nil) {
            self.logGroupName = logGroupName
            self.logStreamNamePrefix = logStreamNamePrefix
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, max: 256)
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, min: 1)
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupName = "logGroupName"
            case logStreamNamePrefix = "logStreamNamePrefix"
        }
    }

    public struct Configuration: AWSEncodableShape & AWSDecodableShape {
        /// The classification within a configuration.
        public let classification: String
        /// A list of additional configurations to apply within a configuration object.
        public let configurations: [Configuration]?
        /// A set of properties specified within a configuration classification.
        public let properties: [String: String]?

        @inlinable
        public init(classification: String, configurations: [Configuration]? = nil, properties: [String: String]? = nil) {
            self.classification = classification
            self.configurations = configurations
            self.properties = properties
        }

        public func validate(name: String) throws {
            try self.validate(self.classification, name: "classification", parent: name, max: 1024)
            try self.validate(self.classification, name: "classification", parent: name, min: 1)
            try self.validate(self.classification, name: "classification", parent: name, pattern: "\\S")
            try self.configurations?.forEach {
                try $0.validate(name: "\(name).configurations[]")
            }
            try self.validate(self.configurations, name: "configurations", parent: name, max: 100)
            try self.properties?.forEach {
                try validate($0.key, name: "properties.key", parent: name, max: 1024)
                try validate($0.key, name: "properties.key", parent: name, min: 1)
                try validate($0.key, name: "properties.key", parent: name, pattern: "\\S")
                try validate($0.value, name: "properties[\"\($0.key)\"]", parent: name, max: 1024)
                try validate($0.value, name: "properties[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "properties[\"\($0.key)\"]", parent: name, pattern: "\\S")
            }
            try self.validate(self.properties, name: "properties", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case classification = "classification"
            case configurations = "configurations"
            case properties = "properties"
        }
    }

    public struct ConfigurationOverrides: AWSEncodableShape & AWSDecodableShape {
        /// The configurations for the application running by the job run.
        public let applicationConfiguration: [Configuration]?
        /// The configurations for monitoring.
        public let monitoringConfiguration: MonitoringConfiguration?

        @inlinable
        public init(applicationConfiguration: [Configuration]? = nil, monitoringConfiguration: MonitoringConfiguration? = nil) {
            self.applicationConfiguration = applicationConfiguration
            self.monitoringConfiguration = monitoringConfiguration
        }

        public func validate(name: String) throws {
            try self.applicationConfiguration?.forEach {
                try $0.validate(name: "\(name).applicationConfiguration[]")
            }
            try self.validate(self.applicationConfiguration, name: "applicationConfiguration", parent: name, max: 100)
            try self.monitoringConfiguration?.validate(name: "\(name).monitoringConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationConfiguration = "applicationConfiguration"
            case monitoringConfiguration = "monitoringConfiguration"
        }
    }

    public struct ContainerLogRotationConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The number of files to keep in container after rotation.
        public let maxFilesToKeep: Int
        /// The file size at which to rotate logs. Minimum of 2KB, Maximum of 2GB.
        public let rotationSize: String

        @inlinable
        public init(maxFilesToKeep: Int, rotationSize: String) {
            self.maxFilesToKeep = maxFilesToKeep
            self.rotationSize = rotationSize
        }

        public func validate(name: String) throws {
            try self.validate(self.maxFilesToKeep, name: "maxFilesToKeep", parent: name, max: 50)
            try self.validate(self.maxFilesToKeep, name: "maxFilesToKeep", parent: name, min: 1)
            try self.validate(self.rotationSize, name: "rotationSize", parent: name, max: 12)
            try self.validate(self.rotationSize, name: "rotationSize", parent: name, min: 3)
            try self.validate(self.rotationSize, name: "rotationSize", parent: name, pattern: "^\\d+(\\.\\d+)?[KMG][Bb]?$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxFilesToKeep = "maxFilesToKeep"
            case rotationSize = "rotationSize"
        }
    }

    public struct ContainerProvider: AWSEncodableShape & AWSDecodableShape {
        /// The ID of the container cluster.
        public let id: String
        /// The information about the container cluster.
        public let info: ContainerInfo?
        /// The type of the container provider. Amazon EKS is the only supported type as of now.
        public let type: ContainerProviderType

        @inlinable
        public init(id: String, info: ContainerInfo? = nil, type: ContainerProviderType) {
            self.id = id
            self.info = info
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 100)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9A-Za-z][A-Za-z0-9\\-_]*$")
            try self.info?.validate(name: "\(name).info")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
            case info = "info"
            case type = "type"
        }
    }

    public struct CreateJobTemplateRequest: AWSEncodableShape {
        /// The client token of the job template.
        public let clientToken: String
        /// The job template data which holds values of StartJobRun API request.
        public let jobTemplateData: JobTemplateData
        /// The KMS key ARN used to encrypt the job template.
        public let kmsKeyArn: String?
        /// The specified name of the job template.
        public let name: String
        /// The tags that are associated with the job template.
        public let tags: [String: String]?

        @inlinable
        public init(clientToken: String = CreateJobTemplateRequest.idempotencyToken(), jobTemplateData: JobTemplateData, kmsKeyArn: String? = nil, name: String, tags: [String: String]? = nil) {
            self.clientToken = clientToken
            self.jobTemplateData = jobTemplateData
            self.kmsKeyArn = kmsKeyArn
            self.name = name
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "\\S")
            try self.jobTemplateData.validate(name: "\(name).jobTemplateData")
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, max: 2048)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, min: 3)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, pattern: "^(arn:(aws[a-zA-Z0-9-]*):kms:.+:(\\d{12})?:key\\/[(0-9a-zA-Z)-?]+|\\$\\{[a-zA-Z]\\w*\\})$")
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "\\S")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "\\S")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case jobTemplateData = "jobTemplateData"
            case kmsKeyArn = "kmsKeyArn"
            case name = "name"
            case tags = "tags"
        }
    }

    public struct CreateJobTemplateResponse: AWSDecodableShape {
        /// This output display the ARN of the created job template.
        public let arn: String?
        /// This output displays the date and time when the job template was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAt: Date?
        /// This output display the created job template ID.
        public let id: String?
        /// This output displays the name of the created job template.
        public let name: String?

        @inlinable
        public init(arn: String? = nil, createdAt: Date? = nil, id: String? = nil, name: String? = nil) {
            self.arn = arn
            self.createdAt = createdAt
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case createdAt = "createdAt"
            case id = "id"
            case name = "name"
        }
    }

    public struct CreateManagedEndpointRequest: AWSEncodableShape {
        /// The certificate ARN provided by users for the managed endpoint. This field is under deprecation and will be removed in future releases.
        public let certificateArn: String?
        /// The client idempotency token for this create call.
        public let clientToken: String
        /// The configuration settings that will be used to override existing configurations.
        public let configurationOverrides: ConfigurationOverrides?
        /// The ARN of the execution role.
        public let executionRoleArn: String
        /// The name of the managed endpoint.
        public let name: String
        /// The Amazon EMR release version.
        public let releaseLabel: String
        /// The tags of the managed endpoint.
        public let tags: [String: String]?
        /// The type of the managed endpoint.
        public let type: String
        /// The ID of the virtual cluster for which a managed endpoint is created.
        public let virtualClusterId: String

        @inlinable
        public init(clientToken: String = CreateManagedEndpointRequest.idempotencyToken(), configurationOverrides: ConfigurationOverrides? = nil, executionRoleArn: String, name: String, releaseLabel: String, tags: [String: String]? = nil, type: String, virtualClusterId: String) {
            self.certificateArn = nil
            self.clientToken = clientToken
            self.configurationOverrides = configurationOverrides
            self.executionRoleArn = executionRoleArn
            self.name = name
            self.releaseLabel = releaseLabel
            self.tags = tags
            self.type = type
            self.virtualClusterId = virtualClusterId
        }

        @available(*, deprecated, message: "Members certificateArn have been deprecated")
        @inlinable
        public init(certificateArn: String? = nil, clientToken: String = CreateManagedEndpointRequest.idempotencyToken(), configurationOverrides: ConfigurationOverrides? = nil, executionRoleArn: String, name: String, releaseLabel: String, tags: [String: String]? = nil, type: String, virtualClusterId: String) {
            self.certificateArn = certificateArn
            self.clientToken = clientToken
            self.configurationOverrides = configurationOverrides
            self.executionRoleArn = executionRoleArn
            self.name = name
            self.releaseLabel = releaseLabel
            self.tags = tags
            self.type = type
            self.virtualClusterId = virtualClusterId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.certificateArn, forKey: .certificateArn)
            try container.encode(self.clientToken, forKey: .clientToken)
            try container.encodeIfPresent(self.configurationOverrides, forKey: .configurationOverrides)
            try container.encode(self.executionRoleArn, forKey: .executionRoleArn)
            try container.encode(self.name, forKey: .name)
            try container.encode(self.releaseLabel, forKey: .releaseLabel)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encode(self.type, forKey: .type)
            request.encodePath(self.virtualClusterId, key: "virtualClusterId")
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateArn, name: "certificateArn", parent: name, max: 2048)
            try self.validate(self.certificateArn, name: "certificateArn", parent: name, min: 44)
            try self.validate(self.certificateArn, name: "certificateArn", parent: name, pattern: "^arn:(aws[a-zA-Z0-9-]*):acm:.+:(\\d{12}):certificate/.+$")
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "\\S")
            try self.configurationOverrides?.validate(name: "\(name).configurationOverrides")
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, max: 2048)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, min: 20)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, pattern: "^arn:(aws[a-zA-Z0-9-]*):iam::(\\d{12})?:(role((\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F))[\\w+=,.@-]+)$")
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.releaseLabel, name: "releaseLabel", parent: name, max: 64)
            try self.validate(self.releaseLabel, name: "releaseLabel", parent: name, min: 1)
            try self.validate(self.releaseLabel, name: "releaseLabel", parent: name, pattern: "^[\\.\\-_/A-Za-z0-9]+$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "\\S")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "\\S")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.type, name: "type", parent: name, max: 64)
            try self.validate(self.type, name: "type", parent: name, min: 1)
            try self.validate(self.type, name: "type", parent: name, pattern: "\\S")
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, max: 64)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, min: 1)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, pattern: "^[0-9a-z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn = "certificateArn"
            case clientToken = "clientToken"
            case configurationOverrides = "configurationOverrides"
            case executionRoleArn = "executionRoleArn"
            case name = "name"
            case releaseLabel = "releaseLabel"
            case tags = "tags"
            case type = "type"
        }
    }

    public struct CreateManagedEndpointResponse: AWSDecodableShape {
        /// The output contains the ARN of the managed endpoint.
        public let arn: String?
        /// The output contains the ID of the managed endpoint.
        public let id: String?
        /// The output contains the name of the managed endpoint.
        public let name: String?
        /// The output contains the ID of the virtual cluster.
        public let virtualClusterId: String?

        @inlinable
        public init(arn: String? = nil, id: String? = nil, name: String? = nil, virtualClusterId: String? = nil) {
            self.arn = arn
            self.id = id
            self.name = name
            self.virtualClusterId = virtualClusterId
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case id = "id"
            case name = "name"
            case virtualClusterId = "virtualClusterId"
        }
    }

    public struct CreateSecurityConfigurationRequest: AWSEncodableShape {
        /// The client idempotency token to use when creating the security configuration.
        public let clientToken: String
        /// The name of the security configuration.
        public let name: String
        /// Security configuration input for the request.
        public let securityConfigurationData: SecurityConfigurationData
        /// The tags to add to the security configuration.
        public let tags: [String: String]?

        @inlinable
        public init(clientToken: String = CreateSecurityConfigurationRequest.idempotencyToken(), name: String, securityConfigurationData: SecurityConfigurationData, tags: [String: String]? = nil) {
            self.clientToken = clientToken
            self.name = name
            self.securityConfigurationData = securityConfigurationData
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "\\S")
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.securityConfigurationData.validate(name: "\(name).securityConfigurationData")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "\\S")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "\\S")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case name = "name"
            case securityConfigurationData = "securityConfigurationData"
            case tags = "tags"
        }
    }

    public struct CreateSecurityConfigurationResponse: AWSDecodableShape {
        /// The ARN (Amazon Resource Name) of the security configuration.
        public let arn: String?
        /// The ID of the security configuration.
        public let id: String?
        /// The name of the security configuration.
        public let name: String?

        @inlinable
        public init(arn: String? = nil, id: String? = nil, name: String? = nil) {
            self.arn = arn
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case id = "id"
            case name = "name"
        }
    }

    public struct CreateVirtualClusterRequest: AWSEncodableShape {
        /// The client token of the virtual cluster.
        public let clientToken: String
        /// The container provider of the virtual cluster.
        public let containerProvider: ContainerProvider
        /// The specified name of the virtual cluster.
        public let name: String
        /// The ID of the security configuration.
        public let securityConfigurationId: String?
        /// The tags assigned to the virtual cluster.
        public let tags: [String: String]?

        @inlinable
        public init(clientToken: String = CreateVirtualClusterRequest.idempotencyToken(), containerProvider: ContainerProvider, name: String, securityConfigurationId: String? = nil, tags: [String: String]? = nil) {
            self.clientToken = clientToken
            self.containerProvider = containerProvider
            self.name = name
            self.securityConfigurationId = securityConfigurationId
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "\\S")
            try self.containerProvider.validate(name: "\(name).containerProvider")
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.securityConfigurationId, name: "securityConfigurationId", parent: name, max: 64)
            try self.validate(self.securityConfigurationId, name: "securityConfigurationId", parent: name, min: 1)
            try self.validate(self.securityConfigurationId, name: "securityConfigurationId", parent: name, pattern: "^[0-9a-z]+$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "\\S")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "\\S")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case containerProvider = "containerProvider"
            case name = "name"
            case securityConfigurationId = "securityConfigurationId"
            case tags = "tags"
        }
    }

    public struct CreateVirtualClusterResponse: AWSDecodableShape {
        /// This output contains the ARN of virtual cluster.
        public let arn: String?
        /// This output contains the virtual cluster ID.
        public let id: String?
        /// This output contains the name of the virtual cluster.
        public let name: String?

        @inlinable
        public init(arn: String? = nil, id: String? = nil, name: String? = nil) {
            self.arn = arn
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case id = "id"
            case name = "name"
        }
    }

    public struct DeleteJobTemplateRequest: AWSEncodableShape {
        /// The ID of the job template that will be deleted.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 64)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteJobTemplateResponse: AWSDecodableShape {
        /// This output contains the ID of the job template that was deleted.
        public let id: String?

        @inlinable
        public init(id: String? = nil) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
        }
    }

    public struct DeleteManagedEndpointRequest: AWSEncodableShape {
        /// The ID of the managed endpoint.
        public let id: String
        /// The ID of the endpoint's virtual cluster.
        public let virtualClusterId: String

        @inlinable
        public init(id: String, virtualClusterId: String) {
            self.id = id
            self.virtualClusterId = virtualClusterId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
            request.encodePath(self.virtualClusterId, key: "virtualClusterId")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 64)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-z]+$")
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, max: 64)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, min: 1)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, pattern: "^[0-9a-z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteManagedEndpointResponse: AWSDecodableShape {
        /// The output displays the ID of the managed endpoint.
        public let id: String?
        /// The output displays the ID of the endpoint's virtual cluster.
        public let virtualClusterId: String?

        @inlinable
        public init(id: String? = nil, virtualClusterId: String? = nil) {
            self.id = id
            self.virtualClusterId = virtualClusterId
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
            case virtualClusterId = "virtualClusterId"
        }
    }

    public struct DeleteVirtualClusterRequest: AWSEncodableShape {
        /// The ID of the virtual cluster that will be deleted.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 64)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteVirtualClusterResponse: AWSDecodableShape {
        /// This output contains the ID of the virtual cluster that will be deleted.
        public let id: String?

        @inlinable
        public init(id: String? = nil) {
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case id = "id"
        }
    }

    public struct DescribeJobRunRequest: AWSEncodableShape {
        /// The ID of the job run request.
        public let id: String
        /// The ID of the virtual cluster for which the job run is submitted.
        public let virtualClusterId: String

        @inlinable
        public init(id: String, virtualClusterId: String) {
            self.id = id
            self.virtualClusterId = virtualClusterId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
            request.encodePath(self.virtualClusterId, key: "virtualClusterId")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 64)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-z]+$")
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, max: 64)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, min: 1)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, pattern: "^[0-9a-z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeJobRunResponse: AWSDecodableShape {
        /// The output displays information about a job run.
        public let jobRun: JobRun?

        @inlinable
        public init(jobRun: JobRun? = nil) {
            self.jobRun = jobRun
        }

        private enum CodingKeys: String, CodingKey {
            case jobRun = "jobRun"
        }
    }

    public struct DescribeJobTemplateRequest: AWSEncodableShape {
        /// The ID of the job template that will be described.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 64)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeJobTemplateResponse: AWSDecodableShape {
        /// This output displays information about the specified job template.
        public let jobTemplate: JobTemplate?

        @inlinable
        public init(jobTemplate: JobTemplate? = nil) {
            self.jobTemplate = jobTemplate
        }

        private enum CodingKeys: String, CodingKey {
            case jobTemplate = "jobTemplate"
        }
    }

    public struct DescribeManagedEndpointRequest: AWSEncodableShape {
        /// This output displays ID of the managed endpoint.
        public let id: String
        /// The ID of the endpoint's virtual cluster.
        public let virtualClusterId: String

        @inlinable
        public init(id: String, virtualClusterId: String) {
            self.id = id
            self.virtualClusterId = virtualClusterId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
            request.encodePath(self.virtualClusterId, key: "virtualClusterId")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 64)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-z]+$")
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, max: 64)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, min: 1)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, pattern: "^[0-9a-z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeManagedEndpointResponse: AWSDecodableShape {
        /// This output displays information about a managed endpoint.
        public let endpoint: Endpoint?

        @inlinable
        public init(endpoint: Endpoint? = nil) {
            self.endpoint = endpoint
        }

        private enum CodingKeys: String, CodingKey {
            case endpoint = "endpoint"
        }
    }

    public struct DescribeSecurityConfigurationRequest: AWSEncodableShape {
        /// The ID of the security configuration.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 64)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeSecurityConfigurationResponse: AWSDecodableShape {
        /// Details of the security configuration.
        public let securityConfiguration: SecurityConfiguration?

        @inlinable
        public init(securityConfiguration: SecurityConfiguration? = nil) {
            self.securityConfiguration = securityConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case securityConfiguration = "securityConfiguration"
        }
    }

    public struct DescribeVirtualClusterRequest: AWSEncodableShape {
        /// The ID of the virtual cluster that will be described.
        public let id: String

        @inlinable
        public init(id: String) {
            self.id = id
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.id, key: "id")
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 64)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[0-9a-z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeVirtualClusterResponse: AWSDecodableShape {
        /// This output displays information about the specified virtual cluster.
        public let virtualCluster: VirtualCluster?

        @inlinable
        public init(virtualCluster: VirtualCluster? = nil) {
            self.virtualCluster = virtualCluster
        }

        private enum CodingKeys: String, CodingKey {
            case virtualCluster = "virtualCluster"
        }
    }

    public struct EksInfo: AWSEncodableShape & AWSDecodableShape {
        /// The namespaces of the Amazon EKS cluster.
        public let namespace: String?

        @inlinable
        public init(namespace: String? = nil) {
            self.namespace = namespace
        }

        public func validate(name: String) throws {
            try self.validate(self.namespace, name: "namespace", parent: name, max: 63)
            try self.validate(self.namespace, name: "namespace", parent: name, min: 1)
            try self.validate(self.namespace, name: "namespace", parent: name, pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$")
        }

        private enum CodingKeys: String, CodingKey {
            case namespace = "namespace"
        }
    }

    public struct EncryptionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// In-transit encryption-related input for the security configuration.
        public let inTransitEncryptionConfiguration: InTransitEncryptionConfiguration?

        @inlinable
        public init(inTransitEncryptionConfiguration: InTransitEncryptionConfiguration? = nil) {
            self.inTransitEncryptionConfiguration = inTransitEncryptionConfiguration
        }

        public func validate(name: String) throws {
            try self.inTransitEncryptionConfiguration?.validate(name: "\(name).inTransitEncryptionConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case inTransitEncryptionConfiguration = "inTransitEncryptionConfiguration"
        }
    }

    public struct Endpoint: AWSDecodableShape {
        /// The ARN of the endpoint.
        public let arn: String?
        /// The certificate ARN of the endpoint. This field is under deprecation and will be removed in future.
        public let certificateArn: String?
        /// The certificate generated by emr control plane on customer behalf to secure the managed endpoint.
        public let certificateAuthority: Certificate?
        /// The configuration settings that are used to override existing configurations for endpoints.
        public let configurationOverrides: ConfigurationOverrides?
        /// The date and time when the endpoint was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAt: Date?
        /// The execution role ARN of the endpoint.
        public let executionRoleArn: String?
        ///  The reasons why the endpoint has failed.
        public let failureReason: FailureReason?
        /// The ID of the endpoint.
        public let id: String?
        /// The name of the endpoint.
        public let name: String?
        /// The EMR release version to be used for the endpoint.
        public let releaseLabel: String?
        /// The security group configuration of the endpoint.
        public let securityGroup: String?
        /// The server URL of the endpoint.
        public let serverUrl: String?
        /// The state of the endpoint.
        public let state: EndpointState?
        ///  Additional details of the endpoint state.
        public let stateDetails: String?
        /// The subnet IDs of the endpoint.
        public let subnetIds: [String]?
        /// The tags of the endpoint.
        public let tags: [String: String]?
        /// The type of the endpoint.
        public let type: String?
        /// The ID of the endpoint's virtual cluster.
        public let virtualClusterId: String?

        @inlinable
        public init(arn: String? = nil, certificateAuthority: Certificate? = nil, configurationOverrides: ConfigurationOverrides? = nil, createdAt: Date? = nil, executionRoleArn: String? = nil, failureReason: FailureReason? = nil, id: String? = nil, name: String? = nil, releaseLabel: String? = nil, securityGroup: String? = nil, serverUrl: String? = nil, state: EndpointState? = nil, stateDetails: String? = nil, subnetIds: [String]? = nil, tags: [String: String]? = nil, type: String? = nil, virtualClusterId: String? = nil) {
            self.arn = arn
            self.certificateArn = nil
            self.certificateAuthority = certificateAuthority
            self.configurationOverrides = configurationOverrides
            self.createdAt = createdAt
            self.executionRoleArn = executionRoleArn
            self.failureReason = failureReason
            self.id = id
            self.name = name
            self.releaseLabel = releaseLabel
            self.securityGroup = securityGroup
            self.serverUrl = serverUrl
            self.state = state
            self.stateDetails = stateDetails
            self.subnetIds = subnetIds
            self.tags = tags
            self.type = type
            self.virtualClusterId = virtualClusterId
        }

        @available(*, deprecated, message: "Members certificateArn have been deprecated")
        @inlinable
        public init(arn: String? = nil, certificateArn: String? = nil, certificateAuthority: Certificate? = nil, configurationOverrides: ConfigurationOverrides? = nil, createdAt: Date? = nil, executionRoleArn: String? = nil, failureReason: FailureReason? = nil, id: String? = nil, name: String? = nil, releaseLabel: String? = nil, securityGroup: String? = nil, serverUrl: String? = nil, state: EndpointState? = nil, stateDetails: String? = nil, subnetIds: [String]? = nil, tags: [String: String]? = nil, type: String? = nil, virtualClusterId: String? = nil) {
            self.arn = arn
            self.certificateArn = certificateArn
            self.certificateAuthority = certificateAuthority
            self.configurationOverrides = configurationOverrides
            self.createdAt = createdAt
            self.executionRoleArn = executionRoleArn
            self.failureReason = failureReason
            self.id = id
            self.name = name
            self.releaseLabel = releaseLabel
            self.securityGroup = securityGroup
            self.serverUrl = serverUrl
            self.state = state
            self.stateDetails = stateDetails
            self.subnetIds = subnetIds
            self.tags = tags
            self.type = type
            self.virtualClusterId = virtualClusterId
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case certificateArn = "certificateArn"
            case certificateAuthority = "certificateAuthority"
            case configurationOverrides = "configurationOverrides"
            case createdAt = "createdAt"
            case executionRoleArn = "executionRoleArn"
            case failureReason = "failureReason"
            case id = "id"
            case name = "name"
            case releaseLabel = "releaseLabel"
            case securityGroup = "securityGroup"
            case serverUrl = "serverUrl"
            case state = "state"
            case stateDetails = "stateDetails"
            case subnetIds = "subnetIds"
            case tags = "tags"
            case type = "type"
            case virtualClusterId = "virtualClusterId"
        }
    }

    public struct GetManagedEndpointSessionCredentialsRequest: AWSEncodableShape {
        /// The client idempotency token of the job run request.
        public let clientToken: String?
        /// Type of the token requested. Currently supported and default value of this field is “TOKEN.”
        public let credentialType: String
        /// Duration in seconds for which the session token is valid. The default duration is 15 minutes and the maximum is 12 hours.
        public let durationInSeconds: Int?
        /// The ARN of the managed endpoint for which the request is submitted.
        public let endpointIdentifier: String
        /// The IAM Execution Role ARN that will be used by the job run.
        public let executionRoleArn: String
        /// String identifier used to separate sections of the execution logs uploaded to S3.
        public let logContext: String?
        /// The ARN of the Virtual Cluster which the Managed Endpoint belongs to.
        public let virtualClusterIdentifier: String

        @inlinable
        public init(clientToken: String? = GetManagedEndpointSessionCredentialsRequest.idempotencyToken(), credentialType: String, durationInSeconds: Int? = nil, endpointIdentifier: String, executionRoleArn: String, logContext: String? = nil, virtualClusterIdentifier: String) {
            self.clientToken = clientToken
            self.credentialType = credentialType
            self.durationInSeconds = durationInSeconds
            self.endpointIdentifier = endpointIdentifier
            self.executionRoleArn = executionRoleArn
            self.logContext = logContext
            self.virtualClusterIdentifier = virtualClusterIdentifier
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.clientToken, forKey: .clientToken)
            try container.encode(self.credentialType, forKey: .credentialType)
            try container.encodeIfPresent(self.durationInSeconds, forKey: .durationInSeconds)
            request.encodePath(self.endpointIdentifier, key: "endpointIdentifier")
            try container.encode(self.executionRoleArn, forKey: .executionRoleArn)
            try container.encodeIfPresent(self.logContext, forKey: .logContext)
            request.encodePath(self.virtualClusterIdentifier, key: "virtualClusterIdentifier")
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "\\S")
            try self.validate(self.credentialType, name: "credentialType", parent: name, max: 64)
            try self.validate(self.credentialType, name: "credentialType", parent: name, min: 1)
            try self.validate(self.credentialType, name: "credentialType", parent: name, pattern: "^.*\\S.*$")
            try self.validate(self.endpointIdentifier, name: "endpointIdentifier", parent: name, max: 2048)
            try self.validate(self.endpointIdentifier, name: "endpointIdentifier", parent: name, min: 1)
            try self.validate(self.endpointIdentifier, name: "endpointIdentifier", parent: name, pattern: "\\S")
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, max: 2048)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, min: 20)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, pattern: "^arn:(aws[a-zA-Z0-9-]*):iam::(\\d{12})?:(role((\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F))[\\w+=,.@-]+)$")
            try self.validate(self.logContext, name: "logContext", parent: name, max: 63)
            try self.validate(self.logContext, name: "logContext", parent: name, min: 3)
            try self.validate(self.logContext, name: "logContext", parent: name, pattern: "^((?!.*-s3alias)(?!xn--.*)[a-z0-9][-a-z0-9.]*)?[a-z0-9]$")
            try self.validate(self.virtualClusterIdentifier, name: "virtualClusterIdentifier", parent: name, max: 2048)
            try self.validate(self.virtualClusterIdentifier, name: "virtualClusterIdentifier", parent: name, min: 1)
            try self.validate(self.virtualClusterIdentifier, name: "virtualClusterIdentifier", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case credentialType = "credentialType"
            case durationInSeconds = "durationInSeconds"
            case executionRoleArn = "executionRoleArn"
            case logContext = "logContext"
        }
    }

    public struct GetManagedEndpointSessionCredentialsResponse: AWSDecodableShape {
        /// The structure containing the session credentials.
        public let credentials: Credentials?
        /// The date and time when the session token will expire.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var expiresAt: Date?
        /// The identifier of the session token returned.
        public let id: String?

        @inlinable
        public init(credentials: Credentials? = nil, expiresAt: Date? = nil, id: String? = nil) {
            self.credentials = credentials
            self.expiresAt = expiresAt
            self.id = id
        }

        private enum CodingKeys: String, CodingKey {
            case credentials = "credentials"
            case expiresAt = "expiresAt"
            case id = "id"
        }
    }

    public struct InTransitEncryptionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// TLS certificate-related configuration input for the security configuration.
        public let tlsCertificateConfiguration: TLSCertificateConfiguration?

        @inlinable
        public init(tlsCertificateConfiguration: TLSCertificateConfiguration? = nil) {
            self.tlsCertificateConfiguration = tlsCertificateConfiguration
        }

        public func validate(name: String) throws {
            try self.tlsCertificateConfiguration?.validate(name: "\(name).tlsCertificateConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case tlsCertificateConfiguration = "tlsCertificateConfiguration"
        }
    }

    public struct JobDriver: AWSEncodableShape & AWSDecodableShape {
        /// The job driver for job type.
        public let sparkSqlJobDriver: SparkSqlJobDriver?
        /// The job driver parameters specified for spark submit.
        public let sparkSubmitJobDriver: SparkSubmitJobDriver?

        @inlinable
        public init(sparkSqlJobDriver: SparkSqlJobDriver? = nil, sparkSubmitJobDriver: SparkSubmitJobDriver? = nil) {
            self.sparkSqlJobDriver = sparkSqlJobDriver
            self.sparkSubmitJobDriver = sparkSubmitJobDriver
        }

        public func validate(name: String) throws {
            try self.sparkSqlJobDriver?.validate(name: "\(name).sparkSqlJobDriver")
            try self.sparkSubmitJobDriver?.validate(name: "\(name).sparkSubmitJobDriver")
        }

        private enum CodingKeys: String, CodingKey {
            case sparkSqlJobDriver = "sparkSqlJobDriver"
            case sparkSubmitJobDriver = "sparkSubmitJobDriver"
        }
    }

    public struct JobRun: AWSDecodableShape {
        /// The ARN of job run.
        public let arn: String?
        /// The client token used to start a job run.
        public let clientToken: String?
        /// The configuration settings that are used to override default configuration.
        public let configurationOverrides: ConfigurationOverrides?
        /// The date and time when the job run was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAt: Date?
        /// The user who created the job run.
        public let createdBy: String?
        /// The execution role ARN of the job run.
        public let executionRoleArn: String?
        /// The reasons why the job run has failed.
        public let failureReason: FailureReason?
        /// The date and time when the job run has finished.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var finishedAt: Date?
        /// The ID of the job run.
        public let id: String?
        /// Parameters of job driver for the job run.
        public let jobDriver: JobDriver?
        /// The name of the job run.
        public let name: String?
        /// The release version of Amazon EMR.
        public let releaseLabel: String?
        /// The configuration of the retry policy that the job runs on.
        public let retryPolicyConfiguration: RetryPolicyConfiguration?
        /// The current status of the retry policy executed on the job.
        public let retryPolicyExecution: RetryPolicyExecution?
        /// The state of the job run.
        public let state: JobRunState?
        /// Additional details of the job run state.
        public let stateDetails: String?
        /// The assigned tags of the job run.
        public let tags: [String: String]?
        /// The ID of the job run's virtual cluster.
        public let virtualClusterId: String?

        @inlinable
        public init(arn: String? = nil, clientToken: String? = nil, configurationOverrides: ConfigurationOverrides? = nil, createdAt: Date? = nil, createdBy: String? = nil, executionRoleArn: String? = nil, failureReason: FailureReason? = nil, finishedAt: Date? = nil, id: String? = nil, jobDriver: JobDriver? = nil, name: String? = nil, releaseLabel: String? = nil, retryPolicyConfiguration: RetryPolicyConfiguration? = nil, retryPolicyExecution: RetryPolicyExecution? = nil, state: JobRunState? = nil, stateDetails: String? = nil, tags: [String: String]? = nil, virtualClusterId: String? = nil) {
            self.arn = arn
            self.clientToken = clientToken
            self.configurationOverrides = configurationOverrides
            self.createdAt = createdAt
            self.createdBy = createdBy
            self.executionRoleArn = executionRoleArn
            self.failureReason = failureReason
            self.finishedAt = finishedAt
            self.id = id
            self.jobDriver = jobDriver
            self.name = name
            self.releaseLabel = releaseLabel
            self.retryPolicyConfiguration = retryPolicyConfiguration
            self.retryPolicyExecution = retryPolicyExecution
            self.state = state
            self.stateDetails = stateDetails
            self.tags = tags
            self.virtualClusterId = virtualClusterId
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case clientToken = "clientToken"
            case configurationOverrides = "configurationOverrides"
            case createdAt = "createdAt"
            case createdBy = "createdBy"
            case executionRoleArn = "executionRoleArn"
            case failureReason = "failureReason"
            case finishedAt = "finishedAt"
            case id = "id"
            case jobDriver = "jobDriver"
            case name = "name"
            case releaseLabel = "releaseLabel"
            case retryPolicyConfiguration = "retryPolicyConfiguration"
            case retryPolicyExecution = "retryPolicyExecution"
            case state = "state"
            case stateDetails = "stateDetails"
            case tags = "tags"
            case virtualClusterId = "virtualClusterId"
        }
    }

    public struct JobTemplate: AWSDecodableShape {
        /// The ARN of the job template.
        public let arn: String?
        ///  The date and time when the job template was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAt: Date?
        ///  The user who created the job template.
        public let createdBy: String?
        /// The error message in case the decryption of job template fails.
        public let decryptionError: String?
        /// The ID of the job template.
        public let id: String?
        /// The job template data which holds values of StartJobRun API request.
        public let jobTemplateData: JobTemplateData
        ///  The KMS key ARN used to encrypt the job template.
        public let kmsKeyArn: String?
        /// The name of the job template.
        public let name: String?
        /// The tags assigned to the job template.
        public let tags: [String: String]?

        @inlinable
        public init(arn: String? = nil, createdAt: Date? = nil, createdBy: String? = nil, decryptionError: String? = nil, id: String? = nil, jobTemplateData: JobTemplateData, kmsKeyArn: String? = nil, name: String? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.createdAt = createdAt
            self.createdBy = createdBy
            self.decryptionError = decryptionError
            self.id = id
            self.jobTemplateData = jobTemplateData
            self.kmsKeyArn = kmsKeyArn
            self.name = name
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case createdAt = "createdAt"
            case createdBy = "createdBy"
            case decryptionError = "decryptionError"
            case id = "id"
            case jobTemplateData = "jobTemplateData"
            case kmsKeyArn = "kmsKeyArn"
            case name = "name"
            case tags = "tags"
        }
    }

    public struct JobTemplateData: AWSEncodableShape & AWSDecodableShape {
        ///  The configuration settings that are used to override defaults configuration.
        public let configurationOverrides: ParametricConfigurationOverrides?
        /// The execution role ARN of the job run.
        public let executionRoleArn: String
        public let jobDriver: JobDriver
        /// The tags assigned to jobs started using the job template.
        public let jobTags: [String: String]?
        /// The configuration of parameters existing in the job template.
        public let parameterConfiguration: [String: TemplateParameterConfiguration]?
        ///  The release version of Amazon EMR.
        public let releaseLabel: String

        @inlinable
        public init(configurationOverrides: ParametricConfigurationOverrides? = nil, executionRoleArn: String, jobDriver: JobDriver, jobTags: [String: String]? = nil, parameterConfiguration: [String: TemplateParameterConfiguration]? = nil, releaseLabel: String) {
            self.configurationOverrides = configurationOverrides
            self.executionRoleArn = executionRoleArn
            self.jobDriver = jobDriver
            self.jobTags = jobTags
            self.parameterConfiguration = parameterConfiguration
            self.releaseLabel = releaseLabel
        }

        public func validate(name: String) throws {
            try self.configurationOverrides?.validate(name: "\(name).configurationOverrides")
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, max: 2048)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, min: 4)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, pattern: "^(^arn:(aws[a-zA-Z0-9-]*):iam::(\\d{12})?:(role((\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F))[\\w+=,.@-]+)$)|([\\.\\-_\\#A-Za-z0-9\\$\\{\\}]+)$")
            try self.jobDriver.validate(name: "\(name).jobDriver")
            try self.jobTags?.forEach {
                try validate($0.key, name: "jobTags.key", parent: name, max: 128)
                try validate($0.key, name: "jobTags.key", parent: name, min: 1)
                try validate($0.key, name: "jobTags.key", parent: name, pattern: "\\S")
                try validate($0.value, name: "jobTags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "jobTags[\"\($0.key)\"]", parent: name, pattern: "\\S")
            }
            try self.validate(self.jobTags, name: "jobTags", parent: name, max: 50)
            try self.parameterConfiguration?.forEach {
                try validate($0.key, name: "parameterConfiguration.key", parent: name, max: 512)
                try validate($0.key, name: "parameterConfiguration.key", parent: name, min: 1)
                try validate($0.key, name: "parameterConfiguration.key", parent: name, pattern: "^[\\.\\-_\\#A-Za-z0-9]+$")
                try $0.value.validate(name: "\(name).parameterConfiguration[\"\($0.key)\"]")
            }
            try self.validate(self.parameterConfiguration, name: "parameterConfiguration", parent: name, max: 100)
            try self.validate(self.releaseLabel, name: "releaseLabel", parent: name, max: 64)
            try self.validate(self.releaseLabel, name: "releaseLabel", parent: name, min: 1)
            try self.validate(self.releaseLabel, name: "releaseLabel", parent: name, pattern: "^([\\.\\-_/A-Za-z0-9]+|\\$\\{[a-zA-Z]\\w*\\})$")
        }

        private enum CodingKeys: String, CodingKey {
            case configurationOverrides = "configurationOverrides"
            case executionRoleArn = "executionRoleArn"
            case jobDriver = "jobDriver"
            case jobTags = "jobTags"
            case parameterConfiguration = "parameterConfiguration"
            case releaseLabel = "releaseLabel"
        }
    }

    public struct LakeFormationConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The session tag to authorize Amazon EMR on EKS for API calls to Lake Formation.
        public let authorizedSessionTagValue: String?
        /// The query engine IAM role ARN that is tied to the secure Spark job. The QueryEngine role assumes the JobExecutionRole to execute all the Lake Formation calls.
        public let queryEngineRoleArn: String?
        /// The namespace input of the system job.
        public let secureNamespaceInfo: SecureNamespaceInfo?

        @inlinable
        public init(authorizedSessionTagValue: String? = nil, queryEngineRoleArn: String? = nil, secureNamespaceInfo: SecureNamespaceInfo? = nil) {
            self.authorizedSessionTagValue = authorizedSessionTagValue
            self.queryEngineRoleArn = queryEngineRoleArn
            self.secureNamespaceInfo = secureNamespaceInfo
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizedSessionTagValue, name: "authorizedSessionTagValue", parent: name, max: 512)
            try self.validate(self.authorizedSessionTagValue, name: "authorizedSessionTagValue", parent: name, min: 1)
            try self.validate(self.authorizedSessionTagValue, name: "authorizedSessionTagValue", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9 ]+$")
            try self.validate(self.queryEngineRoleArn, name: "queryEngineRoleArn", parent: name, max: 2048)
            try self.validate(self.queryEngineRoleArn, name: "queryEngineRoleArn", parent: name, min: 20)
            try self.validate(self.queryEngineRoleArn, name: "queryEngineRoleArn", parent: name, pattern: "^arn:(aws[a-zA-Z0-9-]*):iam::(\\d{12})?:(role((\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F))[\\w+=,.@-]+)$")
            try self.secureNamespaceInfo?.validate(name: "\(name).secureNamespaceInfo")
        }

        private enum CodingKeys: String, CodingKey {
            case authorizedSessionTagValue = "authorizedSessionTagValue"
            case queryEngineRoleArn = "queryEngineRoleArn"
            case secureNamespaceInfo = "secureNamespaceInfo"
        }
    }

    public struct ListJobRunsRequest: AWSEncodableShape {
        /// The date and time after which the job runs were submitted.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAfter: Date?
        /// The date and time before which the job runs were submitted.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdBefore: Date?
        /// The maximum number of job runs that can be listed.
        public let maxResults: Int?
        /// The name of the job run.
        public let name: String?
        /// The token for the next set of job runs to return.
        public let nextToken: String?
        /// The states of the job run.
        public let states: [JobRunState]?
        /// The ID of the virtual cluster for which to list the job run.
        public let virtualClusterId: String

        @inlinable
        public init(createdAfter: Date? = nil, createdBefore: Date? = nil, maxResults: Int? = nil, name: String? = nil, nextToken: String? = nil, states: [JobRunState]? = nil, virtualClusterId: String) {
            self.createdAfter = createdAfter
            self.createdBefore = createdBefore
            self.maxResults = maxResults
            self.name = name
            self.nextToken = nextToken
            self.states = states
            self.virtualClusterId = virtualClusterId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self._createdAfter, key: "createdAfter")
            request.encodeQuery(self._createdBefore, key: "createdBefore")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.name, key: "name")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.states, key: "states")
            request.encodePath(self.virtualClusterId, key: "virtualClusterId")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "\\S")
            try self.validate(self.states, name: "states", parent: name, max: 10)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, max: 64)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, min: 1)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, pattern: "^[0-9a-z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListJobRunsResponse: AWSDecodableShape {
        /// This output lists information about the specified job runs.
        public let jobRuns: [JobRun]?
        /// This output displays the token for the next set of job runs.
        public let nextToken: String?

        @inlinable
        public init(jobRuns: [JobRun]? = nil, nextToken: String? = nil) {
            self.jobRuns = jobRuns
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case jobRuns = "jobRuns"
            case nextToken = "nextToken"
        }
    }

    public struct ListJobTemplatesRequest: AWSEncodableShape {
        /// The date and time after which the job templates were created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAfter: Date?
        ///  The date and time before which the job templates were created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdBefore: Date?
        ///  The maximum number of job templates that can be listed.
        public let maxResults: Int?
        ///  The token for the next set of job templates to return.
        public let nextToken: String?

        @inlinable
        public init(createdAfter: Date? = nil, createdBefore: Date? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.createdAfter = createdAfter
            self.createdBefore = createdBefore
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self._createdAfter, key: "createdAfter")
            request.encodeQuery(self._createdBefore, key: "createdBefore")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListJobTemplatesResponse: AWSDecodableShape {
        ///  This output displays the token for the next set of job templates.
        public let nextToken: String?
        /// This output lists information about the specified job templates.
        public let templates: [JobTemplate]?

        @inlinable
        public init(nextToken: String? = nil, templates: [JobTemplate]? = nil) {
            self.nextToken = nextToken
            self.templates = templates
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case templates = "templates"
        }
    }

    public struct ListManagedEndpointsRequest: AWSEncodableShape {
        ///  The date and time after which the endpoints are created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAfter: Date?
        /// The date and time before which the endpoints are created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdBefore: Date?
        /// The maximum number of managed endpoints that can be listed.
        public let maxResults: Int?
        ///  The token for the next set of managed endpoints to return.
        public let nextToken: String?
        /// The states of the managed endpoints.
        public let states: [EndpointState]?
        /// The types of the managed endpoints.
        public let types: [String]?
        /// The ID of the virtual cluster.
        public let virtualClusterId: String

        @inlinable
        public init(createdAfter: Date? = nil, createdBefore: Date? = nil, maxResults: Int? = nil, nextToken: String? = nil, states: [EndpointState]? = nil, types: [String]? = nil, virtualClusterId: String) {
            self.createdAfter = createdAfter
            self.createdBefore = createdBefore
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.states = states
            self.types = types
            self.virtualClusterId = virtualClusterId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self._createdAfter, key: "createdAfter")
            request.encodeQuery(self._createdBefore, key: "createdBefore")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.states, key: "states")
            request.encodeQuery(self.types, key: "types")
            request.encodePath(self.virtualClusterId, key: "virtualClusterId")
        }

        public func validate(name: String) throws {
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "\\S")
            try self.validate(self.states, name: "states", parent: name, max: 10)
            try self.types?.forEach {
                try validate($0, name: "types[]", parent: name, max: 64)
                try validate($0, name: "types[]", parent: name, min: 1)
                try validate($0, name: "types[]", parent: name, pattern: "\\S")
            }
            try self.validate(self.types, name: "types", parent: name, max: 10)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, max: 64)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, min: 1)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, pattern: "^[0-9a-z]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListManagedEndpointsResponse: AWSDecodableShape {
        /// The managed endpoints to be listed.
        public let endpoints: [Endpoint]?
        ///  The token for the next set of endpoints to return.
        public let nextToken: String?

        @inlinable
        public init(endpoints: [Endpoint]? = nil, nextToken: String? = nil) {
            self.endpoints = endpoints
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case endpoints = "endpoints"
            case nextToken = "nextToken"
        }
    }

    public struct ListSecurityConfigurationsRequest: AWSEncodableShape {
        /// The date and time after which the security configuration was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAfter: Date?
        /// The date and time before which the security configuration was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdBefore: Date?
        /// The maximum number of security configurations the operation can list.
        public let maxResults: Int?
        /// The token for the next set of security configurations to return.
        public let nextToken: String?

        @inlinable
        public init(createdAfter: Date? = nil, createdBefore: Date? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.createdAfter = createdAfter
            self.createdBefore = createdBefore
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self._createdAfter, key: "createdAfter")
            request.encodeQuery(self._createdBefore, key: "createdBefore")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListSecurityConfigurationsResponse: AWSDecodableShape {
        /// The token for the next set of security configurations to return.
        public let nextToken: String?
        /// The list of returned security configurations.
        public let securityConfigurations: [SecurityConfiguration]?

        @inlinable
        public init(nextToken: String? = nil, securityConfigurations: [SecurityConfiguration]? = nil) {
            self.nextToken = nextToken
            self.securityConfigurations = securityConfigurations
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case securityConfigurations = "securityConfigurations"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The ARN of tagged resources.
        public let resourceArn: String

        @inlinable
        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 500)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 60)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws[a-zA-Z0-9-]*):emr-containers:.+:(\\d{12}):/virtualclusters/.+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The tags assigned to resources.
        public let tags: [String: String]?

        @inlinable
        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct ListVirtualClustersRequest: AWSEncodableShape {
        /// The container provider ID of the virtual cluster.
        public let containerProviderId: String?
        /// The container provider type of the virtual cluster. Amazon EKS is the only supported type as of now.
        public let containerProviderType: ContainerProviderType?
        /// The date and time after which the virtual clusters are created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAfter: Date?
        /// The date and time before which the virtual clusters are created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdBefore: Date?
        /// Optional Boolean that specifies whether the operation should return the  virtual clusters that have the access entry integration enabled or disabled. If not specified, the operation returns all applicable virtual clusters.
        public let eksAccessEntryIntegrated: Bool?
        /// The maximum number of virtual clusters that can be listed.
        public let maxResults: Int?
        /// The token for the next set of virtual clusters to return.
        public let nextToken: String?
        /// The states of the requested virtual clusters.
        public let states: [VirtualClusterState]?

        @inlinable
        public init(containerProviderId: String? = nil, containerProviderType: ContainerProviderType? = nil, createdAfter: Date? = nil, createdBefore: Date? = nil, eksAccessEntryIntegrated: Bool? = nil, maxResults: Int? = nil, nextToken: String? = nil, states: [VirtualClusterState]? = nil) {
            self.containerProviderId = containerProviderId
            self.containerProviderType = containerProviderType
            self.createdAfter = createdAfter
            self.createdBefore = createdBefore
            self.eksAccessEntryIntegrated = eksAccessEntryIntegrated
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.states = states
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.containerProviderId, key: "containerProviderId")
            request.encodeQuery(self.containerProviderType, key: "containerProviderType")
            request.encodeQuery(self._createdAfter, key: "createdAfter")
            request.encodeQuery(self._createdBefore, key: "createdBefore")
            request.encodeQuery(self.eksAccessEntryIntegrated, key: "eksAccessEntryIntegrated")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.states, key: "states")
        }

        public func validate(name: String) throws {
            try self.validate(self.containerProviderId, name: "containerProviderId", parent: name, max: 1024)
            try self.validate(self.containerProviderId, name: "containerProviderId", parent: name, min: 1)
            try self.validate(self.containerProviderId, name: "containerProviderId", parent: name, pattern: "\\S")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "\\S")
            try self.validate(self.states, name: "states", parent: name, max: 10)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListVirtualClustersResponse: AWSDecodableShape {
        /// This output displays the token for the next set of virtual clusters.
        public let nextToken: String?
        /// This output lists the specified virtual clusters.
        public let virtualClusters: [VirtualCluster]?

        @inlinable
        public init(nextToken: String? = nil, virtualClusters: [VirtualCluster]? = nil) {
            self.nextToken = nextToken
            self.virtualClusters = virtualClusters
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case virtualClusters = "virtualClusters"
        }
    }

    public struct ManagedLogs: AWSEncodableShape & AWSDecodableShape {
        /// Determines whether Amazon Web Services can retain logs.
        public let allowAWSToRetainLogs: AllowAWSToRetainLogs?
        /// The Amazon resource name (ARN) of the encryption key for logs.
        public let encryptionKeyArn: String?

        @inlinable
        public init(allowAWSToRetainLogs: AllowAWSToRetainLogs? = nil, encryptionKeyArn: String? = nil) {
            self.allowAWSToRetainLogs = allowAWSToRetainLogs
            self.encryptionKeyArn = encryptionKeyArn
        }

        public func validate(name: String) throws {
            try self.validate(self.encryptionKeyArn, name: "encryptionKeyArn", parent: name, max: 2048)
            try self.validate(self.encryptionKeyArn, name: "encryptionKeyArn", parent: name, min: 3)
            try self.validate(self.encryptionKeyArn, name: "encryptionKeyArn", parent: name, pattern: "^(arn:(aws[a-zA-Z0-9-]*):kms:.+:(\\d{12})?:key\\/[(0-9a-zA-Z)-?]+|\\$\\{[a-zA-Z]\\w*\\})$")
        }

        private enum CodingKeys: String, CodingKey {
            case allowAWSToRetainLogs = "allowAWSToRetainLogs"
            case encryptionKeyArn = "encryptionKeyArn"
        }
    }

    public struct MonitoringConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Monitoring configurations for CloudWatch.
        public let cloudWatchMonitoringConfiguration: CloudWatchMonitoringConfiguration?
        /// Enable or disable container log rotation.
        public let containerLogRotationConfiguration: ContainerLogRotationConfiguration?
        /// The entity that controls configuration for managed logs.
        public let managedLogs: ManagedLogs?
        /// Monitoring configurations for the persistent application UI.
        public let persistentAppUI: PersistentAppUI?
        /// Amazon S3 configuration for monitoring log publishing.
        public let s3MonitoringConfiguration: S3MonitoringConfiguration?

        @inlinable
        public init(cloudWatchMonitoringConfiguration: CloudWatchMonitoringConfiguration? = nil, containerLogRotationConfiguration: ContainerLogRotationConfiguration? = nil, managedLogs: ManagedLogs? = nil, persistentAppUI: PersistentAppUI? = nil, s3MonitoringConfiguration: S3MonitoringConfiguration? = nil) {
            self.cloudWatchMonitoringConfiguration = cloudWatchMonitoringConfiguration
            self.containerLogRotationConfiguration = containerLogRotationConfiguration
            self.managedLogs = managedLogs
            self.persistentAppUI = persistentAppUI
            self.s3MonitoringConfiguration = s3MonitoringConfiguration
        }

        public func validate(name: String) throws {
            try self.cloudWatchMonitoringConfiguration?.validate(name: "\(name).cloudWatchMonitoringConfiguration")
            try self.containerLogRotationConfiguration?.validate(name: "\(name).containerLogRotationConfiguration")
            try self.managedLogs?.validate(name: "\(name).managedLogs")
            try self.s3MonitoringConfiguration?.validate(name: "\(name).s3MonitoringConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchMonitoringConfiguration = "cloudWatchMonitoringConfiguration"
            case containerLogRotationConfiguration = "containerLogRotationConfiguration"
            case managedLogs = "managedLogs"
            case persistentAppUI = "persistentAppUI"
            case s3MonitoringConfiguration = "s3MonitoringConfiguration"
        }
    }

    public struct ParametricCloudWatchMonitoringConfiguration: AWSEncodableShape & AWSDecodableShape {
        ///  The name of the log group for log publishing.
        public let logGroupName: String?
        ///  The specified name prefix for log streams.
        public let logStreamNamePrefix: String?

        @inlinable
        public init(logGroupName: String? = nil, logStreamNamePrefix: String? = nil) {
            self.logGroupName = logGroupName
            self.logStreamNamePrefix = logStreamNamePrefix
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, min: 1)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9\\$\\{\\}]+$")
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, max: 256)
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, min: 1)
            try self.validate(self.logStreamNamePrefix, name: "logStreamNamePrefix", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupName = "logGroupName"
            case logStreamNamePrefix = "logStreamNamePrefix"
        }
    }

    public struct ParametricConfigurationOverrides: AWSEncodableShape & AWSDecodableShape {
        ///  The configurations for the application running by the job run.
        public let applicationConfiguration: [Configuration]?
        ///  The configurations for monitoring.
        public let monitoringConfiguration: ParametricMonitoringConfiguration?

        @inlinable
        public init(applicationConfiguration: [Configuration]? = nil, monitoringConfiguration: ParametricMonitoringConfiguration? = nil) {
            self.applicationConfiguration = applicationConfiguration
            self.monitoringConfiguration = monitoringConfiguration
        }

        public func validate(name: String) throws {
            try self.applicationConfiguration?.forEach {
                try $0.validate(name: "\(name).applicationConfiguration[]")
            }
            try self.validate(self.applicationConfiguration, name: "applicationConfiguration", parent: name, max: 100)
            try self.monitoringConfiguration?.validate(name: "\(name).monitoringConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationConfiguration = "applicationConfiguration"
            case monitoringConfiguration = "monitoringConfiguration"
        }
    }

    public struct ParametricMonitoringConfiguration: AWSEncodableShape & AWSDecodableShape {
        ///  Monitoring configurations for CloudWatch.
        public let cloudWatchMonitoringConfiguration: ParametricCloudWatchMonitoringConfiguration?
        ///  Monitoring configurations for the persistent application UI.
        public let persistentAppUI: String?
        ///  Amazon S3 configuration for monitoring log publishing.
        public let s3MonitoringConfiguration: ParametricS3MonitoringConfiguration?

        @inlinable
        public init(cloudWatchMonitoringConfiguration: ParametricCloudWatchMonitoringConfiguration? = nil, persistentAppUI: String? = nil, s3MonitoringConfiguration: ParametricS3MonitoringConfiguration? = nil) {
            self.cloudWatchMonitoringConfiguration = cloudWatchMonitoringConfiguration
            self.persistentAppUI = persistentAppUI
            self.s3MonitoringConfiguration = s3MonitoringConfiguration
        }

        public func validate(name: String) throws {
            try self.cloudWatchMonitoringConfiguration?.validate(name: "\(name).cloudWatchMonitoringConfiguration")
            try self.validate(self.persistentAppUI, name: "persistentAppUI", parent: name, max: 512)
            try self.validate(self.persistentAppUI, name: "persistentAppUI", parent: name, min: 1)
            try self.validate(self.persistentAppUI, name: "persistentAppUI", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9\\$\\{\\}]+$")
            try self.s3MonitoringConfiguration?.validate(name: "\(name).s3MonitoringConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchMonitoringConfiguration = "cloudWatchMonitoringConfiguration"
            case persistentAppUI = "persistentAppUI"
            case s3MonitoringConfiguration = "s3MonitoringConfiguration"
        }
    }

    public struct ParametricS3MonitoringConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Amazon S3 destination URI for log publishing.
        public let logUri: String?

        @inlinable
        public init(logUri: String? = nil) {
            self.logUri = logUri
        }

        public func validate(name: String) throws {
            try self.validate(self.logUri, name: "logUri", parent: name, max: 10280)
            try self.validate(self.logUri, name: "logUri", parent: name, min: 1)
            try self.validate(self.logUri, name: "logUri", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDBFF-\\uDC00\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case logUri = "logUri"
        }
    }

    public struct RetryPolicyConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The maximum number of attempts on the job's driver.
        public let maxAttempts: Int

        @inlinable
        public init(maxAttempts: Int) {
            self.maxAttempts = maxAttempts
        }

        private enum CodingKeys: String, CodingKey {
            case maxAttempts = "maxAttempts"
        }
    }

    public struct RetryPolicyExecution: AWSDecodableShape {
        /// The current number of attempts made on the driver of the job.
        public let currentAttemptCount: Int

        @inlinable
        public init(currentAttemptCount: Int) {
            self.currentAttemptCount = currentAttemptCount
        }

        private enum CodingKeys: String, CodingKey {
            case currentAttemptCount = "currentAttemptCount"
        }
    }

    public struct S3MonitoringConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Amazon S3 destination URI for log publishing.
        public let logUri: String

        @inlinable
        public init(logUri: String) {
            self.logUri = logUri
        }

        public func validate(name: String) throws {
            try self.validate(self.logUri, name: "logUri", parent: name, max: 10280)
            try self.validate(self.logUri, name: "logUri", parent: name, min: 1)
            try self.validate(self.logUri, name: "logUri", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDBFF-\\uDC00\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case logUri = "logUri"
        }
    }

    public struct SecureNamespaceInfo: AWSEncodableShape & AWSDecodableShape {
        /// The ID of the Amazon EKS cluster where Amazon EMR on EKS jobs run.
        public let clusterId: String?
        /// The namespace of the Amazon EKS cluster where the system jobs run.
        public let namespace: String?

        @inlinable
        public init(clusterId: String? = nil, namespace: String? = nil) {
            self.clusterId = clusterId
            self.namespace = namespace
        }

        public func validate(name: String) throws {
            try self.validate(self.clusterId, name: "clusterId", parent: name, max: 100)
            try self.validate(self.clusterId, name: "clusterId", parent: name, min: 1)
            try self.validate(self.clusterId, name: "clusterId", parent: name, pattern: "^[0-9A-Za-z][A-Za-z0-9\\-_]*$")
            try self.validate(self.namespace, name: "namespace", parent: name, max: 63)
            try self.validate(self.namespace, name: "namespace", parent: name, min: 1)
            try self.validate(self.namespace, name: "namespace", parent: name, pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$")
        }

        private enum CodingKeys: String, CodingKey {
            case clusterId = "clusterId"
            case namespace = "namespace"
        }
    }

    public struct SecurityConfiguration: AWSDecodableShape {
        /// The ARN (Amazon Resource Name) of the security configuration.
        public let arn: String?
        /// The date and time that the job run was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAt: Date?
        /// The user who created the job run.
        public let createdBy: String?
        /// The ID of the security configuration.
        public let id: String?
        /// The name of the security configuration.
        public let name: String?
        /// Security configuration inputs for the request.
        public let securityConfigurationData: SecurityConfigurationData?
        /// The tags to assign to the security configuration.
        public let tags: [String: String]?

        @inlinable
        public init(arn: String? = nil, createdAt: Date? = nil, createdBy: String? = nil, id: String? = nil, name: String? = nil, securityConfigurationData: SecurityConfigurationData? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.createdAt = createdAt
            self.createdBy = createdBy
            self.id = id
            self.name = name
            self.securityConfigurationData = securityConfigurationData
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case createdAt = "createdAt"
            case createdBy = "createdBy"
            case id = "id"
            case name = "name"
            case securityConfigurationData = "securityConfigurationData"
            case tags = "tags"
        }
    }

    public struct SecurityConfigurationData: AWSEncodableShape & AWSDecodableShape {
        /// Authorization-related configuration input for the security configuration.
        public let authorizationConfiguration: AuthorizationConfiguration?

        @inlinable
        public init(authorizationConfiguration: AuthorizationConfiguration? = nil) {
            self.authorizationConfiguration = authorizationConfiguration
        }

        public func validate(name: String) throws {
            try self.authorizationConfiguration?.validate(name: "\(name).authorizationConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case authorizationConfiguration = "authorizationConfiguration"
        }
    }

    public struct SparkSqlJobDriver: AWSEncodableShape & AWSDecodableShape {
        /// The SQL file to be executed.
        public let entryPoint: String?
        /// The Spark parameters to be included in the Spark SQL command.
        public let sparkSqlParameters: String?

        @inlinable
        public init(entryPoint: String? = nil, sparkSqlParameters: String? = nil) {
            self.entryPoint = entryPoint
            self.sparkSqlParameters = sparkSqlParameters
        }

        public func validate(name: String) throws {
            try self.validate(self.entryPoint, name: "entryPoint", parent: name, max: 256)
            try self.validate(self.entryPoint, name: "entryPoint", parent: name, min: 1)
            try self.validate(self.entryPoint, name: "entryPoint", parent: name, pattern: "\\S")
            try self.validate(self.sparkSqlParameters, name: "sparkSqlParameters", parent: name, max: 102400)
            try self.validate(self.sparkSqlParameters, name: "sparkSqlParameters", parent: name, min: 1)
            try self.validate(self.sparkSqlParameters, name: "sparkSqlParameters", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case entryPoint = "entryPoint"
            case sparkSqlParameters = "sparkSqlParameters"
        }
    }

    public struct SparkSubmitJobDriver: AWSEncodableShape & AWSDecodableShape {
        /// The entry point of job application.
        public let entryPoint: String
        /// The arguments for job application.
        public let entryPointArguments: [String]?
        /// The Spark submit parameters that are used for job runs.
        public let sparkSubmitParameters: String?

        @inlinable
        public init(entryPoint: String, entryPointArguments: [String]? = nil, sparkSubmitParameters: String? = nil) {
            self.entryPoint = entryPoint
            self.entryPointArguments = entryPointArguments
            self.sparkSubmitParameters = sparkSubmitParameters
        }

        public func validate(name: String) throws {
            try self.validate(self.entryPoint, name: "entryPoint", parent: name, max: 256)
            try self.validate(self.entryPoint, name: "entryPoint", parent: name, min: 1)
            try self.validate(self.entryPoint, name: "entryPoint", parent: name, pattern: "\\S")
            try self.entryPointArguments?.forEach {
                try validate($0, name: "entryPointArguments[]", parent: name, max: 10280)
                try validate($0, name: "entryPointArguments[]", parent: name, min: 1)
                try validate($0, name: "entryPointArguments[]", parent: name, pattern: "\\S")
            }
            try self.validate(self.sparkSubmitParameters, name: "sparkSubmitParameters", parent: name, max: 102400)
            try self.validate(self.sparkSubmitParameters, name: "sparkSubmitParameters", parent: name, min: 1)
            try self.validate(self.sparkSubmitParameters, name: "sparkSubmitParameters", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case entryPoint = "entryPoint"
            case entryPointArguments = "entryPointArguments"
            case sparkSubmitParameters = "sparkSubmitParameters"
        }
    }

    public struct StartJobRunRequest: AWSEncodableShape {
        /// The client idempotency token of the job run request.
        public let clientToken: String
        /// The configuration overrides for the job run.
        public let configurationOverrides: ConfigurationOverrides?
        /// The execution role ARN for the job run.
        public let executionRoleArn: String?
        /// The job driver for the job run.
        public let jobDriver: JobDriver?
        /// The job template ID to be used to start the job run.
        public let jobTemplateId: String?
        /// The values of job template parameters to start a job run.
        public let jobTemplateParameters: [String: String]?
        /// The name of the job run.
        public let name: String?
        /// The Amazon EMR release version to use for the job run.
        public let releaseLabel: String?
        /// The retry policy configuration for the job run.
        public let retryPolicyConfiguration: RetryPolicyConfiguration?
        /// The tags assigned to job runs.
        public let tags: [String: String]?
        /// The virtual cluster ID for which the job run request is submitted.
        public let virtualClusterId: String

        @inlinable
        public init(clientToken: String = StartJobRunRequest.idempotencyToken(), configurationOverrides: ConfigurationOverrides? = nil, executionRoleArn: String? = nil, jobDriver: JobDriver? = nil, jobTemplateId: String? = nil, jobTemplateParameters: [String: String]? = nil, name: String? = nil, releaseLabel: String? = nil, retryPolicyConfiguration: RetryPolicyConfiguration? = nil, tags: [String: String]? = nil, virtualClusterId: String) {
            self.clientToken = clientToken
            self.configurationOverrides = configurationOverrides
            self.executionRoleArn = executionRoleArn
            self.jobDriver = jobDriver
            self.jobTemplateId = jobTemplateId
            self.jobTemplateParameters = jobTemplateParameters
            self.name = name
            self.releaseLabel = releaseLabel
            self.retryPolicyConfiguration = retryPolicyConfiguration
            self.tags = tags
            self.virtualClusterId = virtualClusterId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.clientToken, forKey: .clientToken)
            try container.encodeIfPresent(self.configurationOverrides, forKey: .configurationOverrides)
            try container.encodeIfPresent(self.executionRoleArn, forKey: .executionRoleArn)
            try container.encodeIfPresent(self.jobDriver, forKey: .jobDriver)
            try container.encodeIfPresent(self.jobTemplateId, forKey: .jobTemplateId)
            try container.encodeIfPresent(self.jobTemplateParameters, forKey: .jobTemplateParameters)
            try container.encodeIfPresent(self.name, forKey: .name)
            try container.encodeIfPresent(self.releaseLabel, forKey: .releaseLabel)
            try container.encodeIfPresent(self.retryPolicyConfiguration, forKey: .retryPolicyConfiguration)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            request.encodePath(self.virtualClusterId, key: "virtualClusterId")
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "\\S")
            try self.configurationOverrides?.validate(name: "\(name).configurationOverrides")
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, max: 2048)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, min: 20)
            try self.validate(self.executionRoleArn, name: "executionRoleArn", parent: name, pattern: "^arn:(aws[a-zA-Z0-9-]*):iam::(\\d{12})?:(role((\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F))[\\w+=,.@-]+)$")
            try self.jobDriver?.validate(name: "\(name).jobDriver")
            try self.validate(self.jobTemplateId, name: "jobTemplateId", parent: name, max: 64)
            try self.validate(self.jobTemplateId, name: "jobTemplateId", parent: name, min: 1)
            try self.validate(self.jobTemplateId, name: "jobTemplateId", parent: name, pattern: "^[0-9a-z]+$")
            try self.jobTemplateParameters?.forEach {
                try validate($0.key, name: "jobTemplateParameters.key", parent: name, max: 512)
                try validate($0.key, name: "jobTemplateParameters.key", parent: name, min: 1)
                try validate($0.key, name: "jobTemplateParameters.key", parent: name, pattern: "^[\\.\\-_\\#A-Za-z0-9]+$")
                try validate($0.value, name: "jobTemplateParameters[\"\($0.key)\"]", parent: name, max: 1024)
                try validate($0.value, name: "jobTemplateParameters[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "jobTemplateParameters[\"\($0.key)\"]", parent: name, pattern: "\\S")
            }
            try self.validate(self.jobTemplateParameters, name: "jobTemplateParameters", parent: name, max: 100)
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]+$")
            try self.validate(self.releaseLabel, name: "releaseLabel", parent: name, max: 64)
            try self.validate(self.releaseLabel, name: "releaseLabel", parent: name, min: 1)
            try self.validate(self.releaseLabel, name: "releaseLabel", parent: name, pattern: "^[\\.\\-_/A-Za-z0-9]+$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "\\S")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "\\S")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, max: 64)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, min: 1)
            try self.validate(self.virtualClusterId, name: "virtualClusterId", parent: name, pattern: "^[0-9a-z]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "clientToken"
            case configurationOverrides = "configurationOverrides"
            case executionRoleArn = "executionRoleArn"
            case jobDriver = "jobDriver"
            case jobTemplateId = "jobTemplateId"
            case jobTemplateParameters = "jobTemplateParameters"
            case name = "name"
            case releaseLabel = "releaseLabel"
            case retryPolicyConfiguration = "retryPolicyConfiguration"
            case tags = "tags"
        }
    }

    public struct StartJobRunResponse: AWSDecodableShape {
        /// This output lists the ARN of job run.
        public let arn: String?
        /// This output displays the started job run ID.
        public let id: String?
        /// This output displays the name of the started job run.
        public let name: String?
        /// This output displays the virtual cluster ID for which the job run was submitted.
        public let virtualClusterId: String?

        @inlinable
        public init(arn: String? = nil, id: String? = nil, name: String? = nil, virtualClusterId: String? = nil) {
            self.arn = arn
            self.id = id
            self.name = name
            self.virtualClusterId = virtualClusterId
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case id = "id"
            case name = "name"
            case virtualClusterId = "virtualClusterId"
        }
    }

    public struct TLSCertificateConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The TLS certificate type. Acceptable values: PEM or Custom.
        public let certificateProviderType: CertificateProviderType?
        /// Secrets Manager ARN that contains the private TLS certificate contents, used for communication between the user job and the system job.
        public let privateCertificateSecretArn: String?
        /// Secrets Manager ARN that contains the public TLS certificate contents, used for communication between the user job and the system job.
        public let publicCertificateSecretArn: String?

        @inlinable
        public init(certificateProviderType: CertificateProviderType? = nil, privateCertificateSecretArn: String? = nil, publicCertificateSecretArn: String? = nil) {
            self.certificateProviderType = certificateProviderType
            self.privateCertificateSecretArn = privateCertificateSecretArn
            self.publicCertificateSecretArn = publicCertificateSecretArn
        }

        public func validate(name: String) throws {
            try self.validate(self.privateCertificateSecretArn, name: "privateCertificateSecretArn", parent: name, max: 2048)
            try self.validate(self.privateCertificateSecretArn, name: "privateCertificateSecretArn", parent: name, min: 3)
            try self.validate(self.privateCertificateSecretArn, name: "privateCertificateSecretArn", parent: name, pattern: "^arn:(aws[a-zA-Z0-9-]*):secretsmanager:.+:(\\d{12}):secret:[0-9a-zA-Z/_+=.@-]+$")
            try self.validate(self.publicCertificateSecretArn, name: "publicCertificateSecretArn", parent: name, max: 2048)
            try self.validate(self.publicCertificateSecretArn, name: "publicCertificateSecretArn", parent: name, min: 3)
            try self.validate(self.publicCertificateSecretArn, name: "publicCertificateSecretArn", parent: name, pattern: "^arn:(aws[a-zA-Z0-9-]*):secretsmanager:.+:(\\d{12}):secret:[0-9a-zA-Z/_+=.@-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case certificateProviderType = "certificateProviderType"
            case privateCertificateSecretArn = "privateCertificateSecretArn"
            case publicCertificateSecretArn = "publicCertificateSecretArn"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The ARN of resources.
        public let resourceArn: String
        /// The tags assigned to resources.
        public let tags: [String: String]

        @inlinable
        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
            try container.encode(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 500)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 60)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws[a-zA-Z0-9-]*):emr-containers:.+:(\\d{12}):/virtualclusters/.+$")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "\\S")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "\\S")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TemplateParameterConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The default value for the job template parameter.
        public let defaultValue: String?
        /// The type of the job template parameter. Allowed values are: ‘STRING’, ‘NUMBER’.
        public let type: TemplateParameterDataType?

        @inlinable
        public init(defaultValue: String? = nil, type: TemplateParameterDataType? = nil) {
            self.defaultValue = defaultValue
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.defaultValue, name: "defaultValue", parent: name, max: 1024)
            try self.validate(self.defaultValue, name: "defaultValue", parent: name, min: 1)
            try self.validate(self.defaultValue, name: "defaultValue", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultValue = "defaultValue"
            case type = "type"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The ARN of resources.
        public let resourceArn: String
        /// The tag keys of the resources.
        public let tagKeys: [String]

        @inlinable
        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
            request.encodeQuery(self.tagKeys, key: "tagKeys")
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 500)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 60)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws[a-zA-Z0-9-]*):emr-containers:.+:(\\d{12}):/virtualclusters/.+$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "\\S")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct VirtualCluster: AWSDecodableShape {
        /// The ARN of the virtual cluster.
        public let arn: String?
        /// The container provider of the virtual cluster.
        public let containerProvider: ContainerProvider?
        /// The date and time when the virtual cluster is created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdAt: Date?
        /// The ID of the virtual cluster.
        public let id: String?
        /// The name of the virtual cluster.
        public let name: String?
        /// The ID of the security configuration.
        public let securityConfigurationId: String?
        /// The state of the virtual cluster.
        public let state: VirtualClusterState?
        /// The assigned tags of the virtual cluster.
        public let tags: [String: String]?

        @inlinable
        public init(arn: String? = nil, containerProvider: ContainerProvider? = nil, createdAt: Date? = nil, id: String? = nil, name: String? = nil, securityConfigurationId: String? = nil, state: VirtualClusterState? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.containerProvider = containerProvider
            self.createdAt = createdAt
            self.id = id
            self.name = name
            self.securityConfigurationId = securityConfigurationId
            self.state = state
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case containerProvider = "containerProvider"
            case createdAt = "createdAt"
            case id = "id"
            case name = "name"
            case securityConfigurationId = "securityConfigurationId"
            case state = "state"
            case tags = "tags"
        }
    }

    public struct ContainerInfo: AWSEncodableShape & AWSDecodableShape {
        /// The information about the Amazon EKS cluster.
        public let eksInfo: EksInfo?

        @inlinable
        public init(eksInfo: EksInfo? = nil) {
            self.eksInfo = eksInfo
        }

        public func validate(name: String) throws {
            try self.eksInfo?.validate(name: "\(name).eksInfo")
        }

        private enum CodingKeys: String, CodingKey {
            case eksInfo = "eksInfo"
        }
    }

    public struct Credentials: AWSDecodableShape {
        /// The actual session token being returned.
        public let token: String?

        @inlinable
        public init(token: String? = nil) {
            self.token = token
        }

        private enum CodingKeys: String, CodingKey {
            case token = "token"
        }
    }
}

// MARK: - Errors

/// Error enum for EMRContainers
public struct EMRContainersErrorType: AWSErrorType {
    enum Code: String {
        case eksRequestThrottledException = "EKSRequestThrottledException"
        case internalServerException = "InternalServerException"
        case requestThrottledException = "RequestThrottledException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize EMRContainers
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// The request exceeded the Amazon EKS API operation limits.
    public static var eksRequestThrottledException: Self { .init(.eksRequestThrottledException) }
    /// This is an internal server exception.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The request throttled.
    public static var requestThrottledException: Self { .init(.requestThrottledException) }
    /// The specified resource was not found.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// There are invalid parameters in the client request.
    public static var validationException: Self { .init(.validationException) }
}

extension EMRContainersErrorType: Equatable {
    public static func == (lhs: EMRContainersErrorType, rhs: EMRContainersErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension EMRContainersErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
